//package blender.makesrna.srna;
//
//import static blender.makesrna.RnaContextUtil.rna_Context_area_get;
//import static blender.makesrna.RnaContextUtil.rna_Context_mode_get;
//import static blender.makesrna.RnaContextUtil.rna_Context_scene_get;
//import static blender.makesrna.RnaContextUtil.rna_Context_screen_get;
//import static blender.makesrna.RnaContextUtil.rna_Context_space_data_get;
//import static blender.makesrna.RnaContextUtil.rna_Context_tool_settings_get;
//import static blender.makesrna.RnaContextUtil.rna_Context_user_preferences_get;
//import static blender.makesrna.RnaContextUtil.rna_Context_window_get;
//import blender.blenkernel.bContext;
//import blender.makesdna.SpaceTypes;
//import blender.makesrna.RNATypes.PointerRNA;
//import blender.makesrna.rna_internal_types.StructRNA;
//
//public class RnaContext extends RnaStruct {
//	
//	public Object edit_object;
//	public Object active_object;
//	
//	public RnaContext(PointerRNA ptr) {
//		super(ptr);
//	}
//	
//	public Object getWindow_manager() {
////		return new RNA_WindowManager(rna_Context_manager_get(ptr));
//		return null;
//	}
//	
//	public RnaWindow getWindow() {
//		return new RnaWindow(rna_Context_window_get(ptr));
//	}
//	
//	public RnaScreen getScreen() {
//		return new RnaScreen(rna_Context_screen_get(ptr));
//	}
//	
//	public RnaArea getArea() {
//		return new RnaArea(rna_Context_area_get(ptr));
//	}
//	
//	public RnaSpace getSpace_data() {
//		switch (bContext.CTX_wm_area((bContext)ptr.data).spacetype&0xFF) {
//			case SpaceTypes.SPACE_TIME:
//				return new RnaSpaceTimeline(rna_Context_space_data_get(ptr));
//			case SpaceTypes.SPACE_OUTLINER:
//				return new RnaSpaceOutliner(rna_Context_space_data_get(ptr));
//			case SpaceTypes.SPACE_NODE:
//				return new RnaSpaceNodeEditor(rna_Context_space_data_get(ptr));
//			default:
//				return new RnaSpace(rna_Context_space_data_get(ptr));
//		}
//	}
//	
//	public RnaScene getScene() {
//		return new RnaScene(rna_Context_scene_get(ptr));
//	}
//	
//	public RnaToolSettings getTool_settings() {
//		return new RnaToolSettings(rna_Context_tool_settings_get(ptr));
//	}
//	
//	public RnaUserPreferences getUser_preferences() {
//		return new RnaUserPreferences(rna_Context_user_preferences_get(ptr));
//	}
//	
//	public String getMode() {
//		return rna_Context_mode_items.values()[rna_Context_mode_get(ptr)].name();
//	}
//	
//	static enum rna_Context_mode_items {
//		EDIT_MESH,
//		EDIT_CURVE,
//		EDIT_SURFACE,
//		EDIT_TEXT,
//		EDIT_ARMATURE,
//		EDIT_METABALL,
//		EDIT_LATTICE,
//		POSE,
//		SCULPT,
//		PAINT_WEIGHT,
//		PAINT_VERTEX,
//		PAINT_TEXTURE,
//		PARTICLE,
//		OBJECT,
//	};
//	
//	public static StructRNA RNA_Context = new StructRNA(
//		"Context"
//	);
//
//}


/* Automatically generated struct definitions for the Data API.
   Do not edit manually, changes will be overwritten.           */

package blender.makesrna.srna;

import blender.makesdna.sdna.*;

import static blender.makesrna.RnaRna.*;
import static blender.makesrna.RnaAccess.*;
import static blender.makesrna.RnaDefine.*;
import static blender.makesrna.RNATypes.*;
import blender.makesrna.rna_internal_types.*;
import blender.blenlib.*;
import blender.blenkernel.*;

import static blender.makesrna.RnaContextUtil.*;

public class RnaContext extends RnaStruct {
	
public RnaObject object;
public Object edit_object;
public Object active_object;

/* Autogenerated Functions */

public RnaContext(PointerRNA ptr) {
	super(ptr);
	object = new RnaObject(new PointerRNA(RnaObject.RNA_Object, bContext.CTX_data_active_object((bContext)ptr.data)));
}

private static PropCollectionGetFunc Context_rna_properties_get = new PropCollectionGetFunc() {
public PointerRNA get(CollectionPropertyIterator iter)
{
	return rna_builtin_properties_get.get(iter);
}};

private static PropCollectionBeginFunc Context_rna_properties_begin = new PropCollectionBeginFunc() {
public void begin(CollectionPropertyIterator iter, PointerRNA ptr)
{

	iter.clear();
	iter.parent= ptr;
	iter.prop= (PropertyRNA)rna_Context_rna_properties;

	rna_builtin_properties_begin.begin(iter, ptr);

	if(iter.valid)
		iter.ptr= Context_rna_properties_get.get(iter);
}};

private static PropCollectionNextFunc Context_rna_properties_next = new PropCollectionNextFunc() {
public void next(CollectionPropertyIterator iter)
{
	rna_builtin_properties_next.next(iter);

	if(iter.valid)
		iter.ptr= Context_rna_properties_get.get(iter);
}};

private static PropCollectionEndFunc Context_rna_properties_end = new PropCollectionEndFunc() {
public void end(CollectionPropertyIterator iter)
{
	rna_iterator_listbase_end.end(iter);
}};

private static PropPointerGetFunc Context_rna_type_get = new PropPointerGetFunc() {
public PointerRNA getPtr(PointerRNA ptr)
{
	return rna_builtin_type_get.getPtr(ptr);
}};

public Object getWindow_manager() { return null; }
private static PropPointerGetFunc Context_window_manager_get = new PropPointerGetFunc() {
public PointerRNA getPtr(PointerRNA ptr)
{
	return rna_Context_manager_get.getPtr(ptr);
}};

public RnaWindow getWindow() { return new RnaWindow(Context_window_get.getPtr(ptr)); }
private static PropPointerGetFunc Context_window_get = new PropPointerGetFunc() {
public PointerRNA getPtr(PointerRNA ptr)
{
	return rna_Context_window_get.getPtr(ptr);
}};

public RnaScreen getScreen() { return new RnaScreen(Context_screen_get.getPtr(ptr)); }
private static PropPointerGetFunc Context_screen_get = new PropPointerGetFunc() {
public PointerRNA getPtr(PointerRNA ptr)
{
	return rna_Context_screen_get.getPtr(ptr);
}};

public RnaArea getArea() { return new RnaArea(Context_area_get.getPtr(ptr)); }
private static PropPointerGetFunc Context_area_get = new PropPointerGetFunc() {
public PointerRNA getPtr(PointerRNA ptr)
{
	return rna_Context_area_get.getPtr(ptr);
}};

public RnaSpace getSpace_data() {
	PointerRNA newptr = Context_space_data_get.getPtr(ptr);
	if (newptr.type == RnaSpaceTimeline.RNA_SpaceTimeline) return new RnaSpaceTimeline(newptr);
	else if (newptr.type == RnaSpaceOutliner.RNA_SpaceOutliner) return new RnaSpaceOutliner(newptr);
	else if (newptr.type == RnaSpaceNodeEditor.RNA_SpaceNodeEditor) return new RnaSpaceNodeEditor(newptr);
	else return new RnaSpace(newptr);
}
private static PropPointerGetFunc Context_space_data_get = new PropPointerGetFunc() {
public PointerRNA getPtr(PointerRNA ptr)
{
	return rna_Context_space_data_get.getPtr(ptr);
}};

private static PropPointerGetFunc Context_region_get = new PropPointerGetFunc() {
public PointerRNA getPtr(PointerRNA ptr)
{
	return rna_Context_region_get.getPtr(ptr);
}};

private static PropPointerGetFunc Context_region_data_get = new PropPointerGetFunc() {
public PointerRNA getPtr(PointerRNA ptr)
{
	return rna_Context_region_data_get.getPtr(ptr);
}};

private static PropPointerGetFunc Context_blend_data_get = new PropPointerGetFunc() {
public PointerRNA getPtr(PointerRNA ptr)
{
	return rna_Context_main_get.getPtr(ptr);
}};

public RnaScene getScene() { return new RnaScene(Context_scene_get.getPtr(ptr)); }
private static PropPointerGetFunc Context_scene_get = new PropPointerGetFunc() {
public PointerRNA getPtr(PointerRNA ptr)
{
	return rna_Context_scene_get.getPtr(ptr);
}};

public RnaToolSettings getTool_settings() { return new RnaToolSettings(Context_tool_settings_get.getPtr(ptr)); }
private static PropPointerGetFunc Context_tool_settings_get = new PropPointerGetFunc() {
public PointerRNA getPtr(PointerRNA ptr)
{
	return rna_Context_tool_settings_get.getPtr(ptr);
}};

public RnaUserPreferences getUser_preferences() { return new RnaUserPreferences(Context_user_preferences_get.getPtr(ptr)); }
private static PropPointerGetFunc Context_user_preferences_get = new PropPointerGetFunc() {
public PointerRNA getPtr(PointerRNA ptr)
{
	return rna_Context_user_preferences_get.getPtr(ptr);
}};

public String getMode() { return EnumPropertyItem.name(rna_Context_mode_items, Context_mode_get.getEnum(ptr)); }
private static PropEnumGetFunc Context_mode_get = new PropEnumGetFunc() {
public int getEnum(PointerRNA ptr)
{
	return rna_Context_mode_get.getEnum(ptr);
}};

/* Context */
private static CollectionPropertyRNA rna_Context_rna_properties = new CollectionPropertyRNA(
	null, null,
	-1, "rna_properties", 128, "Properties",
	"RNA property collection",
	0,
	PROP_COLLECTION, PROP_NONE|PROP_UNIT_NONE, null, 0, new int[]{0, 0, 0}, 0,
	null, 0, null, null,
	0, -1, null,
	Context_rna_properties_begin, Context_rna_properties_next, Context_rna_properties_end, Context_rna_properties_get, null, null, rna_builtin_properties_lookup_string, RnaProperty.RNA_Property
);

private static PointerPropertyRNA rna_Context_rna_type = new PointerPropertyRNA(
	null, null,
	-1, "rna_type", 524288, "RNA",
	"RNA type definition",
	0,
	PROP_POINTER, PROP_NONE|PROP_UNIT_NONE, null, 0, new int[]{0, 0, 0}, 0,
	null, 0, null, null,
	0, -1, null,
	Context_rna_type_get, null, null, null,RnaStruct.RNA_Struct
);

private static PointerPropertyRNA rna_Context_window_manager = new PointerPropertyRNA(
	null, null,
	-1, "window_manager", 0, "window_manager",
	"",
	0,
	PROP_POINTER, PROP_NONE|PROP_UNIT_NONE, null, 0, new int[]{0, 0, 0}, 0,
	null, 0, null, null,
	0, -1, null,
	Context_window_manager_get, null, null, null,RNA_WindowManager
);

private static PointerPropertyRNA rna_Context_window = new PointerPropertyRNA(
	null, null,
	-1, "window", 0, "window",
	"",
	0,
	PROP_POINTER, PROP_NONE|PROP_UNIT_NONE, null, 0, new int[]{0, 0, 0}, 0,
	null, 0, null, null,
	0, -1, null,
	Context_window_get, null, null, null,RnaWindow.RNA_Window
);

private static PointerPropertyRNA rna_Context_screen = new PointerPropertyRNA(
	null, null,
	-1, "screen", 0, "screen",
	"",
	0,
	PROP_POINTER, PROP_NONE|PROP_UNIT_NONE, null, 0, new int[]{0, 0, 0}, 0,
	null, 0, null, null,
	0, -1, null,
	Context_screen_get, null, null, null,RnaScreen.RNA_Screen
);

private static PointerPropertyRNA rna_Context_area = new PointerPropertyRNA(
	null, null,
	-1, "area", 0, "area",
	"",
	0,
	PROP_POINTER, PROP_NONE|PROP_UNIT_NONE, null, 0, new int[]{0, 0, 0}, 0,
	null, 0, null, null,
	0, -1, null,
	Context_area_get, null, null, null,RnaArea.RNA_Area
);

private static PointerPropertyRNA rna_Context_space_data = new PointerPropertyRNA(
	null, null,
	-1, "space_data", 0, "space_data",
	"",
	0,
	PROP_POINTER, PROP_NONE|PROP_UNIT_NONE, null, 0, new int[]{0, 0, 0}, 0,
	null, 0, null, null,
	0, -1, null,
	Context_space_data_get, null, null, null,RnaSpace.RNA_Space
);

private static PointerPropertyRNA rna_Context_region = new PointerPropertyRNA(
	null, null,
	-1, "region", 0, "region",
	"",
	0,
	PROP_POINTER, PROP_NONE|PROP_UNIT_NONE, null, 0, new int[]{0, 0, 0}, 0,
	null, 0, null, null,
	0, -1, null,
	Context_region_get, null, null, null,RNA_Region
);

private static PointerPropertyRNA rna_Context_region_data = new PointerPropertyRNA(
	null, null,
	-1, "region_data", 0, "region_data",
	"",
	0,
	PROP_POINTER, PROP_NONE|PROP_UNIT_NONE, null, 0, new int[]{0, 0, 0}, 0,
	null, 0, null, null,
	0, -1, null,
	Context_region_data_get, null, null, null,RNA_Region
);

private static PointerPropertyRNA rna_Context_blend_data = new PointerPropertyRNA(
	null, null,
	-1, "blend_data", 0, "blend_data",
	"",
	0,
	PROP_POINTER, PROP_NONE|PROP_UNIT_NONE, null, 0, new int[]{0, 0, 0}, 0,
	null, 0, null, null,
	0, -1, null,
	Context_blend_data_get, null, null, null,RnaBlendData.RNA_BlendData
);

private static PointerPropertyRNA rna_Context_scene = new PointerPropertyRNA(
	null, null,
	-1, "scene", 0, "scene",
	"",
	0,
	PROP_POINTER, PROP_NONE|PROP_UNIT_NONE, null, 0, new int[]{0, 0, 0}, 0,
	null, 0, null, null,
	0, -1, null,
	Context_scene_get, null, null, null,RnaScene.RNA_Scene
);

private static PointerPropertyRNA rna_Context_tool_settings = new PointerPropertyRNA(
	null, null,
	-1, "tool_settings", 0, "tool_settings",
	"",
	0,
	PROP_POINTER, PROP_NONE|PROP_UNIT_NONE, null, 0, new int[]{0, 0, 0}, 0,
	null, 0, null, null,
	0, -1, null,
	Context_tool_settings_get, null, null, null,RnaToolSettings.RNA_ToolSettings
);

private static PointerPropertyRNA rna_Context_user_preferences = new PointerPropertyRNA(
	null, null,
	-1, "user_preferences", 0, "user_preferences",
	"",
	0,
	PROP_POINTER, PROP_NONE|PROP_UNIT_NONE, null, 0, new int[]{0, 0, 0}, 0,
	null, 0, null, null,
	0, -1, null,
	Context_user_preferences_get, null, null, null,RNA_UserPreferences
);

private static EnumPropertyItem[] rna_Context_mode_items = {
	new EnumPropertyItem(0, "EDIT_MESH", 0, "Mesh Edit", ""),
	new EnumPropertyItem(1, "EDIT_CURVE", 0, "Curve Edit", ""),
	new EnumPropertyItem(2, "EDIT_SURFACE", 0, "Surface Edit", ""),
	new EnumPropertyItem(3, "EDIT_TEXT", 0, "Edit Edit", ""),
	new EnumPropertyItem(4, "EDIT_ARMATURE", 0, "Armature Edit", ""),
	new EnumPropertyItem(5, "EDIT_METABALL", 0, "Metaball Edit", ""),
	new EnumPropertyItem(6, "EDIT_LATTICE", 0, "Lattice Edit", ""),
	new EnumPropertyItem(7, "POSE", 0, "Pose ", ""),
	new EnumPropertyItem(8, "SCULPT", 0, "Sculpt", ""),
	new EnumPropertyItem(9, "PAINT_WEIGHT", 0, "Weight Paint", ""),
	new EnumPropertyItem(10, "PAINT_VERTEX", 0, "Vertex Paint", ""),
	new EnumPropertyItem(11, "PAINT_TEXTURE", 0, "Texture Paint", ""),
	new EnumPropertyItem(12, "PARTICLE", 0, "Particle", ""),
	new EnumPropertyItem(13, "OBJECT", 0, "Object", ""),
	new EnumPropertyItem(0, null, 0, null, null)
};

private static EnumPropertyRNA rna_Context_mode = new EnumPropertyRNA(
	null, null,
	-1, "mode", 2, "mode",
	"",
	0,
	PROP_ENUM, PROP_NONE|PROP_UNIT_NONE, null, 0, new int[]{0, 0, 0}, 0,
	null, 0, null, null,
	0, -1, null,
	Context_mode_get, null, null, rna_Context_mode_items, 14, 0
);

static { ListBase tmp = new ListBase();
	ListBaseUtil.BLI_addtail(tmp, rna_Context_rna_properties);
	ListBaseUtil.BLI_addtail(tmp, rna_Context_rna_type);
	ListBaseUtil.BLI_addtail(tmp, rna_Context_window_manager);
	ListBaseUtil.BLI_addtail(tmp, rna_Context_window);
	ListBaseUtil.BLI_addtail(tmp, rna_Context_screen);
	ListBaseUtil.BLI_addtail(tmp, rna_Context_area);
	ListBaseUtil.BLI_addtail(tmp, rna_Context_space_data);
	ListBaseUtil.BLI_addtail(tmp, rna_Context_region);
	ListBaseUtil.BLI_addtail(tmp, rna_Context_region_data);
	ListBaseUtil.BLI_addtail(tmp, rna_Context_blend_data);
	ListBaseUtil.BLI_addtail(tmp, rna_Context_scene);
	ListBaseUtil.BLI_addtail(tmp, rna_Context_tool_settings);
	ListBaseUtil.BLI_addtail(tmp, rna_Context_user_preferences);
	ListBaseUtil.BLI_addtail(tmp, rna_Context_mode);
}

static { ListBase tmp = new ListBase();
}

public static StructRNA RNA_Context = new StructRNA(
	RnaScene.RNA_Scene, null,
	null,
	rna_Context_rna_properties, rna_Context_mode,
	null,null,
	"Context", 0, "Context", "Current windowmanager and data context",
	17,
	null, rna_Context_rna_properties,
	null,
	null,
	null,
	null,
	null,
	null,
	null,
	null, null
);

}

